const {aritcleMod}=require('../mod/aritcleMod.js');

module.exports.Fclass=async function(){
  let data=await aritcleMod.find();
  return data;
}

module.exports.oneClass=async function(Info){
  let data=await aritcleMod.findOne({className:Info.className});
  return data;
}

module.exports.classId=async function(Info){
  let data=await aritcleMod.find({className:Info.className});
  return data[0];
}

module.exports.updateClass=async function(Info){
  let data=await aritcleMod.updateOne({_id:Info.id},{className:Info.className})
}

module.exports.deleteClass=async function(Info){
  let data=await aritcleMod.remove({_id:Info.id});
}

module.exports.addClass=async function(Info){
  let data=await aritcleMod.create(Info);
}